﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _01ExchangeValues
{
    class _01ExchangeValues
    {
        static void Main(string[] args)
        {
            Console.WriteLine("If the first variable is greater than the second one, \ntheir places will be switched. Otherwise no.");
            Console.Write("Enter first value: a = ");
            int a = int.Parse(Console.ReadLine());
            Console.Write("Enter second value: b = ");
            int b = int.Parse(Console.ReadLine());
            if (a > b)
            {
                a = a + b;
                b = a - b;
                a = a - b;
                Console.WriteLine("The value of a is " + a);
                Console.WriteLine("The value of b is " + b);
            }
            else
            {
                Console.WriteLine("The value of a is " + a);
                Console.WriteLine("The value of b is " + b);
            }
        }
    }
}
